# $Id: PKGBUILD 65602 2012-02-21 09:26:32Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Claudio Sabattoli <gasherbrum3@alice.it>

pkgname=idesk
pkgver=0.7.5
pkgrel=4
pkgdesc="iDesk gives users of minimal wm's (fluxbox, blackbox, openbox, windowsmaker...) icons on their desktop"
arch=("i686" "x86_64")
url="http://idesk.sourceforge.net/wiki/index.php"
license=('GPL')
depends=('pkgconfig' 'imlib2' 'libpng' 'libxpm' 'libxft' 'gcc-libs')
source=("http://downloads.sourceforge.net/sourceforge/idesk/$pkgname-$pkgver.tar.bz2")
md5sums=('beb48c97815c7b085e3b3d601297fbb8')

build() {
  cd $srcdir/$pkgname-$pkgver

  ./configure --prefix=/usr

  sed -i '1,1i#include <unistd.h>' src/DesktopConfig.cpp
  sed -i '1,1i#include <sys/stat.h>' src/DesktopConfig.cpp
  sed -i '1,1i#include <sys/types.h>' src/DesktopConfig.cpp

  make
  make DESTDIR=$pkgdir install

  sed -i 's#usr/local#usr#' $pkgdir/usr/share/idesk/default.lnk
}
